package com.atguigu.guli.service.cms.controller.api;


import com.atguigu.guli.service.cms.service.AdService;
import com.atguigu.guli.service.result.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 * 广告推荐 前端控制器
 * </p>
 *
 * @author atguigu
 * @since 2021-07-07
 */
@RestController
@RequestMapping("/api/cms/ad")

public class ApiAdController {
    @Autowired
    AdService adService;

    @GetMapping("/queryAllAd")
    public R queryAllAd(){
       Map map = adService.queryAllAd();
       return R.ok().data(map);
    }

}

